<template>
	<view class="box-content">
		<rich-text :nodes="contentString"  class="rich-text"></rich-text>
	</view>
</template>

<script>
	export default {
		name:"roc-text",
		props: {
			content: {
				type: String,
				default: ""
			}
		},
		computed: {
			contentString() {
				return this.content.replace(/\<img/gi, '<img class="rich-img" ')
			}
		},
	}
</script>

<style lang="scss">
	.rich-text{
		word-break: break-all;
		text-align: justify;
		white-space: pre-wrap;
	}
	/deep/ .rich-img {
		max-width: 100% !important;
		height: auto !important;
	}
</style>
